import { BasicRemoveParams } from './../model/baseModel';
import { defHttp } from '/@/utils/http/axios';
import { ListHospitalParams, HospitalParams, HospitalGetResultModel } from './model/hospitalModel';
enum Api  {
    LIST_HOSPITAL = "/hospital/listHospital",
    UPDATE_HOSPITAL = "/hospital/updateHospital",
    REMOVE_HOSPITAL = "/hospital/removeHospital",
    ADD_HOSPITAL = "/hospital/addHospital",
  LIST_OPTION_HOSPITAL = "/hospital/listOptionHospital"
}

export const listHospital = (params:ListHospitalParams)=>{
    return defHttp.post<HospitalGetResultModel>({url:Api.LIST_HOSPITAL,params})
}
export const updateHospital = (params:HospitalParams) =>{
    return defHttp.post({url:Api.UPDATE_HOSPITAL,params})
}
export const removeHospital = (params:BasicRemoveParams)=>{
    return defHttp.post({url:Api.REMOVE_HOSPITAL,params})
}
export const addHospital = (params:HospitalParams)=>{
    return defHttp.post({url:Api.ADD_HOSPITAL,params})
}

export const  listOptionHospital = ()=>{
  return defHttp.get({url:Api.LIST_OPTION_HOSPITAL})
}
